import pulp
model = pulp.LpProblem(name="tubecutting", sense=pulp.LpMinimize)
x = {i: pulp.LpVariable(name=f"x{i}",lowBound=0,cat=pulp.LpInteger) for i in range(1, 8)}
model += (x[1]+2*x[2]+x[7] >= 100)
model += (3*x[3]+2*x[4]+x[5]+x[7] >= 100)
model += (4*x[1]+x[2]+2*x[4]+4*x[5]+6*x[6]+x[7] >= 100)
model += x[1]+x[2]+x[3]+x[4]+x[5]+x[6]+x[7]
status = model.solve()
print(f"status: {model.status}, {pulp.LpStatus[model.status]}")
print(f"objective: {model.objective.value()}")
for var in model.variables():
    print(f"{var.name}: {var.value()}")
for name, constraint in model.constraints.items():
    print(f"{name}: {constraint.value()}")
